
<div class="btn-group"><a href="<?php echo site_urlc('topic/index');?>" class="btn"> <i class="fa fa-arrow-left"></i> <?php echo lang('back_list')?> </a></div>

<?php include_once 'inc_form_errors.php'; ?>

<div class="boxed">
    <h3> <i class="fa fa-pencil"></i> 详情 <span class="badge badge-success pull-right"><?php echo $title; ?></span></h3>
    <?php echo form_open(current_urlc(), array('class' => 'form-horizontal', 'id' => 'frm-edit')); ?>

    <div class="boxed-inner seamless">

        <div class="control-group">
            <label for="title" class="control-label">发布人姓名:</label>
            <div class="controls">
                <?php
                 $uid = $it['uid'];
                 $user_info = $this->db->query("select * from boc_account where id=$uid")->result_array();
                 echo $user_info[0]['uname'];
                ?>
                <span class="help-inline"></span>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="content"> 内容 </label>
            <div class="controls">
                <?php if($it['content']!=''){echo $it['content'];}else{echo $it['r_content'];} ?>
            </div>
        </div>

        <!-- 图片上传 -->
        <div class="control-group">
            <label for="img" class="control-label">图片：</label>
            <?php
            $photos = array();
            if($it['photo']!=''){
                $c_photos = explode(',',$it['photo']);
                foreach($c_photos as $c_photo){
                    $img = $this->db->query("select * from boc_upload where id=$c_photo")->result_array();
                    if(!empty($img)){
                        $photos[] = UPLOAD_URL.$img[0]['url'];
                    }
                }
            }
            ?>
            <?php foreach($photos as $vv){?>
            <img src="<?php echo $vv;?>">
            <?php }?>
        </div>


    </div>
    </form>
</div>

<!-- 注意加载顺序 -->
<?php include_once 'inc_ui_media.php'; ?>
<script type="text/javascript">
    require(['adminer/js/ui','adminer/js/media','bootstrap-datetimepicker.zh'],function(ui,media){

    });
</script>
